//Popup action
function ctrlInitArrowPopupAction(context, selector){
	var win = window;//(window.parent)?window.parent:window;
	$(".ctrl-action-type-popup", context).click( function(){
		var tempReloadHadler = win.Page.reloadHandler;
		var rel = $(this).attr("rel");
		
		var settings = {};
		settings.url = $(this).attr("href");
		if( rel && rel.indexOf("|")!= -1 ){
			var tmp = rel.split("|");
			settings.width = tmp[0];
			settings.height = tmp[1];
			if(tmp[2] != ""){
				win.Page.reloadHandler = function(force){ CtrlAjax.reload(tmp[2])};
				settings.endRemove = function(elts, settings){
					win.Page.reloadHandler = tempReloadHadler;
				};
			}
		}
		
		if( $(this).attr("target") == "_blank" ){
			settings.forceType = "iframe";
		}else{
			settings.endShowContent = function(elts, settings){
				win.Page.parseHtml(elts.content);
			};
		}
		
		$.nyroModalManual(settings);
		return false;
	});
	
}